

// import customCollapse from "./customCollapse"
import formCom from "./formCom"
export default defineComponent(
  {
    // components: { customCollapse, },
    props: ["slotName", "testName"],
    data() {
      let form = {
        "parentName": "test",
        "isleaf": "1",
        "barid": "",
        "barname": "barname",
        "index": 222,
        "svgBody": "<div>svgBody</div>",
        "lightIntensity": 0.3,
        "lightColor": "rgba(19, 206, 102, 0.8)"
      }
      let comOpt = {
        "formConf": {
          "template": [
            {
              "props": {
                "model": {
                  "parentName": "test",
                  "isleaf": "1",
                  "barid": "",
                  "barname": "barname",
                  "index": 666,
                  "svgBody": "<div>svgBody</div>",
                  "lightIntensity": 0.3,
                  "lightColor": "rgba(19, 206, 102, 0.8)"
                }
              },
              "components": [
                {
                  "style": "",
                  "class": "dark",
                  "on": {},
                  "props": {
                    "controls-position": "right",
                    "min": 1,
                    "v_model": "index"
                  },
                  "formItemProps": {
                    "label": "顺序",
                    "isRequired": true,
                    "prop": "index"
                  },
                  "span": 10,
                  "offset": 0,
                  "push": 0,
                  "comName": "ElInputNumber",
                  "varys": {}
                }
              ]
            },
            {
              "props": { 'model': form },
              "components": [
                {
                  "span": 4,
                  "comName": "ElButton",
                  "type": "primary",
                  "style": "width: 60px",
                  "contentText": "选择"
                }
              ]
            }
          ]
        },
        "slotName": "body"
      }
      return {
        activeNames: ["1"],
        form,
        comOpt

      }
    },
    render(ctx) {
      return <div>{ctx.slotName}</div>
      // return <el-form model={ctx.form} >
      //   <customCollapse slotName='body' testName="111">
      //     {/*  {(<formCom {...ctx.comOpt}></formCom>)} */}
      //     {{
      //       [ctx.slotName]: () => (<formCom {...ctx.comOpt}></formCom>),
      //       'title': () =>
      //         <span>test commenslot</span>
      //     }}
      //     {/*  {{ 'body': () => (<ElButton {...ctx.comOpt}></ElButton>) }} */}
      //   </customCollapse>
      // </el-form>
    }
  }
)

